// TIFFImageReader.cpp : Defines the entry point for the console application.
//

#include <opencv/cv.h>
#include <opencv/highgui.h>

#include "GeoTiffReader.hxx"
#include "GeoTiffImage.hxx"

int main()
{

	GeoTiffImage image;
	GeoTiffReader reader;

	//reader.setGeoTiffFileName("F:/JQHTemp/MyCHUNK03-1-2.tif");
	//reader.setGeoTiffFileName("F:/JQHTiles/JQH01_CHUNK01-3-7.tif");
	//reader.setGeoTiffFileName("/home/hzy/XXH20190820A1.TIFF");
	reader.setGeoTiffFileName("/home/hzy/XXH20190820A1DEM.TIFF");


	reader.setGeoTiffImage(&image);

	reader.readImage();

	printf("ImageShape:(%d,%d)\n",image.getWidth(), image.getHeight());
	printf("Image Depth:%d\n", image.getDepth());
	printf("Image Channels:%d\n", image.getChannels());
	printf("Image Min Value:%f\n", image.getMinValue());
	printf("Image Max Value:%f\n", image.getMaxValue());

	// IplImage* vimage = image.convert2IplImage();

	// cvShowImage("ReaderTest", vimage);

	// cvWaitKey(0);

    return 0;
}
